package com.hbnu.test.www.Self_Learning;


import java.util.function.IntConsumer;

public class Lambda_learning{

    public static void main(String[] args) {
        int x = 1;
        int y = 2;
        int z = 0;
        repeat(10,(i)->{
            System.out.println("CountDown:" + (9-i));
        });

    }
    public static void repeat(int n, IntConsumer action){
        for (int i = 0;i < n;i++)
            action.accept(i);
    }
}
